#pragma once
#include "log_manager.h"
#if __cplusplus > 201703L
#include <format>
#else
#include <fmt/format.h>
#endif

namespace lib_wrapper {

#define ilog (::lib_wrapper::LogManager::instance().get_logger())

#if __cplusplus > 201703L
#define LOG(level, ...) ilog->log(#level, std::format("{}:{}, {} {}", __FILE__, __LINE__, __FUNCTION__, std::format(__VA_ARGS__)))
#else
#define LOG(level, ...) ilog->log(#level, fmt::format("{}:{}, {} {}", __FILE__, __LINE__, __FUNCTION__, fmt::format(__VA_ARGS__)))
#endif

} // namespace lib_wrapper
